<template>
    <el-radio-group v-model.trim="value" @change="change">
        <el-radio :key="item.label" v-for="item in datas" :label="item.label">
            {{ item.text }}
        </el-radio>
    </el-radio-group>
</template>
<script>
import { ref } from 'vue';

export default {
    name: 'SearchRadioGroup',
    props: {
        datas: {
            required: true,
            default: [],
        },
        change: {
            type: Function,
        },
    },
    setup() {
        const value = ref(1);
        return { value };
    },
};
</script>

<style scoped>
.el-radio-group {
    padding: 12px 16px;
}
</style>
